Optimal. Leaf size=63 \[ -\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3399, 4269,
3556} \begin {gather*} \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{a f}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )\right )}{a f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3399
Rule 3556
Rule 4269
Rubi steps
\begin {align*} \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx &=\frac {\int (c+d x) \csc ^2\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right ) \, dx}{2 a}\\ &=\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}-\frac {d \int \coth \left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right ) \, dx}{a f}\\ &=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(185\) vs. \(2(63)=126\).
time = 0.31, size = 185, normalized size = 2.94 \begin {gather*} \frac {i d f x \cosh \left (e+\frac {f x}{2}\right )+\cosh \left (\frac {f x}{2}\right ) \left (-2 i d \text {ArcTan}\left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right )-d \log (\cosh (e+f x))\right )+2 c f \sinh \left (\frac {f x}{2}\right )+d f x \sinh \left (\frac {f x}{2}\right )+2 d \text {ArcTan}\left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right ) \sinh \left (e+\frac {f x}{2}\right )-i d \log (\cosh (e+f x)) \sinh \left (e+\frac {f x}{2}\right )}{a f^2 \left (\cosh \left (\frac {e}{2}\right )+i \sinh \left (\frac {e}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (e+f x)\right )+i \sinh \left (\frac {1}{2} (e+f x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.80, size = 66, normalized size = 1.05
method | result | size |
risch | \(\frac {2 d x}{a f}+\frac {2 d e}{a \,f^{2}}+\frac {2 i \left (d x +c \right )}{f a \left ({\mathrm e}^{f x +e}-i\right )}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}-i\right )}{a \,f^{2}}\) | \(66\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 80, normalized size = 1.27 \begin {gather*} 2 \, d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} - i \, a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} - i\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} - \frac {2 \, c}{{\left (i \, a e^{\left (-f x - e\right )} - a\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 64, normalized size = 1.02 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (f x + e\right )} + i \, c f - {\left (d e^{\left (f x + e\right )} - i \, d\right )} \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.13, size = 56, normalized size = 0.89 \begin {gather*} \frac {2 i c + 2 i d x}{a f e^{e} e^{f x} - i a f} + \frac {2 d x}{a f} - \frac {2 d \log {\left (e^{f x} - i e^{- e} \right )}}{a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 67, normalized size = 1.06 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (f x + e\right )} - d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + i \, c f + i \, d \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.34, size = 56, normalized size = 0.89 \begin {gather*} \frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e+f\,x}-\mathrm {i}\right )}+\frac {2\,d\,x}{a\,f}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )}{a\,f^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________